using System;
namespace DreamPark
{
	[Serializable]
	public class Borne
	{
		private int compteurTickets;
		private int numeroAcces;
		
		public int CompteurTickets {
			get { return compteurTickets; }
			set { compteurTickets = value; }
		}
		
		public Borne (int numeroAcces) {
			this.compteurTickets = 0;
			this.numeroAcces = numeroAcces;
		}
		
		public Ticket GenererTicket(Place place, string immatriculation) {
			this.compteurTickets++;
			string numeroTicket = this.numeroAcces.ToString() + "0" + this.compteurTickets.ToString();
			Ticket ticket = new Ticket(numeroTicket, place, immatriculation);
			return ticket;
		}
		
		public void reinitialiserCompteurTickets() {
			this.compteurTickets = 0;
		}
	}
}

